<?PHP

$table='user';
$id='user_id';
$post=$_POST;
//$post=process_serialized_values($post);
$post=process_serialized_data($post,'serial','user_serial');
$catch="user_email";




if($_POST['cmd']=='add' && !empty($_POST[$catch]))
{
	
	echo 'adding user';
	$post['user_password']=md5($post['user_password']); 
	//$post['user_serial']=$post['content_serial'];
	$user_process=new user;
	$user_process->post=$post;
	$code=$user_process->add_user();
	

}
else if($_POST['cmd']=='edit')
{
	
		process_sql_post($post,$table,'update',$id,$_GET[$id]);
		printmessage('Successfully Modified');
}

	if($_GET['cmd']=='edit' && isset($_GET[$id]))
	{

		$e=get_data_form($table,$id);

	
			if($e['user_serial'] == 'N;' || empty($e['user_serial']) )
			{
	
					
			}
			else
			{
					$serial=unserialize($e['user_serial']);
					$e=array_merge($e,$serial);	
			}
				
	//	//rp($e);

	}

?>